﻿using System;
using System.Collections.Generic;
using System.Text;
using xiaodingmarket_Domain_core.Events;
using static xiaodingmarket_Domain.Models.EunmType;

namespace xiaodingmarket_Domain.Events.Commodity
{
    //这里的事件模型将被序列化存储到事件溯源中
    public class CommodityCreateEvent:Event
    {

        public CommodityCreateEvent(Guid userid, Guid commodityid, Kind? kind, Category category, DateTime endtime) 
        {
            this.userid = userid;
            this.commodityid = commodityid;
            Kind = kind;
            Category = category;
            this.endtime = endtime;
            AggregateId = userid;
        }

        public Guid userid { get; set; }  //发布人id
        public Guid commodityid { get; set; }  //商品id
        public Kind? Kind { get; set; }
        public Category Category { get; set; }
        public DateTime endtime { get; private set; }
    }
}
